URL re-writing problem
am 22.12.2009 10:49:09 von vijay shanker
--001636920c1344f64e047b4e1fcd
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
I am very new to httpd server. And i have a immediate problem to solve. My
server instance is running on centos box.
If a request comes to my server as
----
http://sub-domain.domain.com
---
This should be translated to
---
http://domain.com/key/sub-domain
---
I have configured many virtual host on my server. But this is quite a case
and i am running out of ideas
Any suggestion: what should i do?
Regards,
Vijay Shanker Dubey
--001636920c1344f64e047b4e1fcd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all,
I am very new to httpd server. And i =
have=A0a=A0immediate=A0problem=A0to solve.=A0My server instance is running =
on centos box.
If a request comes to my server as<=
/div>
----
---
This sh=
ould be translated to=A0
---
Any=A0suggestion: what should i do?
iv>
Regards,
Vijay=
Shanker Dubey
--001636920c1344f64e047b4e1fcd--
RE: URL re-writing problem
am 22.12.2009 15:51:07 von Oliver Schoenborn
Vijay,=20
If you have a small number of subdomains, I would try, for each one:
ServerName subdomainN.domain.com
ProxyRequests off
ProxyPass / http://domain.com/key/subdomainN
ProxyPassReverse / http://domain.com/key/subdomainN
Otherwise I would try a rewrite rule such as:
RewriteCond %(HTTP_HOST) (.+).domain.com
RewriteRule ^(.+)$ %(HTTP_HOST)$1 [C]
RewriteRule (.+).domain.com(.*) http://domain.com/key/$1$2 [L]
The first rule is required so that pattern matching can extract the subdoma=
in name. The condition can be removed if the rewrite rules appear in a vhos=
t.=20
Oliver
From: vijay shanker [mailto:vijay.shad@gmail.com]=20
Sent: December 22, 2009 4:49 AM
To: users@httpd.apache.org
Subject: [users@httpd] URL re-writing problem
Hi all,
I am very new to httpd server. And i have=A0a=A0immediate=A0problem=A0to so=
lve.=A0My server instance is running on centos box.
If a request comes to my server as
----
http://sub-domain.domain.com
---
This should be translated to=A0
---
http://domain.com/key/sub-domain
---
I have configured many virtual host on my server. But this is quite a case =
and i am running out of ideas=A0
Any=A0suggestion: what should i do?
Regards,
Vijay Shanker Dubey
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: URL re-writing problem
am 23.12.2009 02:16:27 von Igor Cicimov
--00504502cc3568730f047b5b1245
Content-Type: text/plain; charset=ISO-8859-1
Only this %(HTTP_HOST) should be in curly brackets
On Wed, Dec 23, 2009 at 1:51 AM, Oliver Schoenborn wrote:
> Vijay,
> If you have a small number of subdomains, I would try, for each one:
>
>
> ServerName subdomainN.domain.com
> ProxyRequests off
> ProxyPass / http://domain.com/key/subdomainN
> ProxyPassReverse / http://domain.com/key/subdomainN
>
>
> Otherwise I would try a rewrite rule such as:
>
> RewriteCond %(HTTP_HOST) (.+).domain.com
> RewriteRule ^(.+)$ %(HTTP_HOST)$1 [C]
> RewriteRule (.+).domain.com(.*) http://domain.com/key/$1$2 [L]
>
> The first rule is required so that pattern matching can extract the
> subdomain name. The condition can be removed if the rewrite rules appear in
> a vhost.
>
> Oliver
>
>
> From: vijay shanker [mailto:vijay.shad@gmail.com]
> Sent: December 22, 2009 4:49 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] URL re-writing problem
>
> Hi all,
>
> I am very new to httpd server. And i have a immediate problem to solve. My
> server instance is running on centos box.
>
> If a request comes to my server as
>
> ----
> http://sub-domain.domain.com
> ---
>
> This should be translated to
>
> ---
> http://domain.com/key/sub-domain
> ---
>
> I have configured many virtual host on my server. But this is quite a case
> and i am running out of ideas
>
>
> Any suggestion: what should i do?
>
>
>
>
> Regards,
> Vijay Shanker Dubey
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--00504502cc3568730f047b5b1245
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Only this %(HTTP_HOST) should be in curly brackets
=3D"gmail_quote">On Wed, Dec 23, 2009 at 1:51 AM, Oliver Schoenborn
ir=3D"ltr"><>
span> wrote:
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Vijay,
If you have a small number of subdomains, I would try, for each one:
<virtualhost *:80>
=A0 =A0ServerName
k">subdomainN.domain.com
=A0 =A0ProxyRequests off
=A0 =A0ProxyPass =A0 =A0 =A0 =A0 / =A0
bdomainN" target=3D"_blank">http://domain.com/key/subdomainN
=A0 =A0ProxyPassReverse =A0/ =A0
nN" target=3D"_blank">http://domain.com/key/subdomainN
</virtualhost>
Otherwise I would try a rewrite rule such as:
RewriteCond %(HTTP_HOST) (.+).
k">domain.com
RewriteRule ^(.+)$ %(HTTP_HOST)$1 =A0 =A0[C]
RewriteRule (.+).domain.com=
(.*) http://do=
main.com/key/$1$2 =A0 =A0 [L]
The first rule is required so that pattern matching can extract the subdoma=
in name. The condition can be removed if the rewrite rules appear in a vhos=
t.
Oliver
From: vijay shanker [mailto:vijay.s=
had@gmail.com]
Sent: December 22, 2009 4:49 AM
To:
>
Subject: [users@httpd] URL re-writing problem
Hi all,
I am very new to httpd server. And i have=A0a=A0immediate=A0problem=A0to so=
lve.=A0My server instance is running on centos box.
If a request comes to my server as
----
http://sub-domai=
n.domain.com
---
This should be translated to=A0
---
http://domai=
n.com/key/sub-domain
---
I have configured many virtual host on my server. But this is quite a case =
and i am running out of ideas=A0
Any=A0suggestion: what should i do?
Regards,
Vijay Shanker Dubey
--00504502cc3568730f047b5b1245--
Re: URL re-writing problem
am 24.12.2009 07:20:20 von vijay shanker
--0016e64807c02bde4e047b73705e
Content-Type: text/plain; charset=ISO-8859-1
Thanks guys for your suggestions. In mean time i have got a good
link describing many situations.
These situations I believe has many takers.
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
Regards,
Vijay Shanker Dubey
On Wed, Dec 23, 2009 at 6:46 AM, Igor Cicimov wrote:
> Only this %(HTTP_HOST) should be in curly brackets
>
>
> On Wed, Dec 23, 2009 at 1:51 AM, Oliver Schoenborn wrote:
>
>> Vijay,
>> If you have a small number of subdomains, I would try, for each one:
>>
>>
>> ServerName subdomainN.domain.com
>> ProxyRequests off
>> ProxyPass / http://domain.com/key/subdomainN
>> ProxyPassReverse / http://domain.com/key/subdomainN
>>
>>
>> Otherwise I would try a rewrite rule such as:
>>
>> RewriteCond %(HTTP_HOST) (.+).domain.com
>> RewriteRule ^(.+)$ %(HTTP_HOST)$1 [C]
>> RewriteRule (.+).domain.com(.*) http://domain.com/key/$1$2 [L]
>>
>> The first rule is required so that pattern matching can extract the
>> subdomain name. The condition can be removed if the rewrite rules appear in
>> a vhost.
>>
>> Oliver
>>
>>
>> From: vijay shanker [mailto:vijay.shad@gmail.com]
>> Sent: December 22, 2009 4:49 AM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] URL re-writing problem
>>
>> Hi all,
>>
>> I am very new to httpd server. And i have a immediate problem to solve. My
>> server instance is running on centos box.
>>
>> If a request comes to my server as
>>
>> ----
>> http://sub-domain.domain.com
>> ---
>>
>> This should be translated to
>>
>> ---
>> http://domain.com/key/sub-domain
>> ---
>>
>> I have configured many virtual host on my server. But this is quite a case
>> and i am running out of ideas
>>
>>
>> Any suggestion: what should i do?
>>
>>
>>
>>
>> Regards,
>> Vijay Shanker Dubey
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
--0016e64807c02bde4e047b73705e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thanks guys for your suggestions. In mean time i have got a good link=
=A0describing=A0many=A0situations.
These situation=
s I believe has many takers.
ache.org/docs/2.0/misc/rewriteguide.html">http://httpd.apach e.org/docs/2.0/=
misc/rewriteguide.html
eguide.html">Regards,
Vijay Shanker Dubey
On Wed, Dec 23, 2009 at 6:46 AM, Igor Ci=
cimov
<icicimov@=
gmail.com> wrote:
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Only this %(HTTP_HOST) should be in curly brackets
class=3D"h5">
On Wed, Dec 23, 2009 at 1:=
51 AM, Oliver Schoenborn
<
e.com" target=3D"_blank">schoenb@cae.com> wrote:
04, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Vijay,
If you have a small number of subdomains, I would try, for each one:
<virtualhost *:80>
=A0 =A0ServerName
k">subdomainN.domain.com
=A0 =A0ProxyRequests off
=A0 =A0ProxyPass =A0 =A0 =A0 =A0 / =A0
bdomainN" target=3D"_blank">http://domain.com/key/subdomainN
=A0 =A0ProxyPassReverse =A0/ =A0
nN" target=3D"_blank">http://domain.com/key/subdomainN
</virtualhost>
Otherwise I would try a rewrite rule such as:
RewriteCond %(HTTP_HOST) (.+).
k">domain.com
RewriteRule ^(.+)$ %(HTTP_HOST)$1 =A0 =A0[C]
RewriteRule (.+).domain.com=
(.*) http://do=
main.com/key/$1$2 =A0 =A0 [L]
The first rule is required so that pattern matching can extract the subdoma=
in name. The condition can be removed if the rewrite rules appear in a vhos=
t.
Oliver
From: vijay shanker [mailto:
=3D"_blank">vijay.shad@gmail.com]
Sent: December 22, 2009 4:49 AM
To: users@httpd=
..apache.org
Subject: [users@httpd] URL re-writing problem
Hi all,
I am very new to httpd server. And i have=A0a=A0immediate=A0problem=A0to so=
lve.=A0My server instance is running on centos box.
If a request comes to my server as
----
http://sub-domai=
n.domain.com
---
This should be translated to=A0
---
http://domai=
n.com/key/sub-domain
---
I have configured many virtual host on my server. But this is quite a case =
and i am running out of ideas=A0
Any=A0suggestion: what should i do?
Regards,
Vijay Shanker Dubey
--0016e64807c02bde4e047b73705e--